package com.google.sydym6.controllers;

import java.util.List;

import android.support.v4.app.Fragment;

import com.google.sydym6.logic.IRadioScrobblerModel;
import com.google.sydym6.logic.RadioScrobblerModel;
import com.google.sydym6.logic.database.data.IRadioData;

public abstract class AbstractListRadioController implements IListRadioController{


	IRadioScrobblerModel model;
	Fragment view;
	
	public AbstractListRadioController(Fragment view) {
		this.view = view;
		this.model = RadioScrobblerModel.getInstance();
	}
	
	@Override
	public abstract List<IRadioData> getList();
	
	@Override
	public void setCurrentRadio(IRadioData radioData) {
		if(!radioData.equals(model.getRadioManager().getRadio())) {
			model.getRadioManager().setRadio(radioData);
		}
	}

}
